import request from '@/utils/request'



export function refundMoney(memberId,money,remark) {
  return request({
    url: '/mahjong/members/refund/'+memberId+'/'+money+'/'+remark,
    method: 'get'
  })
}


export function checkout(memberId,deskingId) {
  return request({
    url: '/mahjong/costs/checkout/'+memberId+"/"+deskingId,
    method: 'get'
  })
}
export function checkoutAll(deskingId) {
  return request({
    url: '/mahjong/costs/checkout/'+deskingId,
    method: 'get'
  })
}
export function saveIntegralCover(query) {
  return request({
    url: '/mahjong/record/saveIntegralCover',
    method: 'post',
    data: query
  })
}

export function stopTime(orderNumber,status) {
  return request({
    url: '/mahjong/costs/stopTime/'+orderNumber+"/"+status,
    method: 'get'
  })
}

export function cancelOpenTable(query) {
  return request({
    url: '/mahjong/costs/cancelOpenTable/'+query,
    method: 'get',
    data: query
  })
}

export function changeTableTime(query) {
  return request({
    url: '/mahjong/costs/changeTableTime',
    method: 'post',
    data: query
  })
}

//结束开桌
export function stopDesk(query) {
  return request({
    url: '/mahjong/costs/overOpenTable',
    method: 'post',
    data: query
  })
}

export function listOpenMoney(query) {
  return request({
    url: '/mahjong/record/ListOpenMoney',
    method: 'get',
    params: query
  })
}

export function listOpenAllMoney(query) {
  return request({
    url: '/mahjong/record/listOpenAllMoney',
    method: 'get',
    params: query
  })
}

//查询房间列表
export function getRoom(query) {
  return request({
    url: '/mahjong/record/getRoom',
    method: 'get',
    params: query
  })
}

//查询班次金额信息
export function getMoneyInfo() {
  return request({
    url: '/mahjong/myshops/moneyInfo',
    method: 'get'
  })
}
export function AllRecord(query) {
  return request({
    url: '/mahjong/record/AllRecord',
    method: 'get',
    params: query
  })
}
export function realTimeData(query) {
  return request({
    url: '/mahjong/record/realTimeData',
    method: 'get',
    params: query
  })
}
// 查询桌号柱状图
export function tableCollect(query) {
  return request({
    url: '/mahjong/record/tableCollect',
    method: 'get',
    params: query
  })
}
//查询交班记录
export function getWorkRecord(query) {
  return request({
    url: '/mahjong/myshops/workRecord',
    method: 'get',
    params: query
  })
}

//上班操作
export function setInitMOney(initMoney) {
  return request({
    url: '/mahjong/myshops/goWork/'+initMoney,
    method: 'get'
  })
}
//收支明细操作
export function getDetailInfo(id) {
  return request({
    url: '/mahjong/myshops/goWorksss/'+id,
    method: 'get'
  })
}

//下班操作
export function goXiaBan(deliverMoney,remainingMoney) {
  return request({
    url: '/mahjong/myshops/offWork/'+deliverMoney+"/"+remainingMoney,
    method: 'get'
  })
}
// 查询整体流水列表
export function recordIndex(query) {
  return request({
    url: '/mahjong/record/Index',
    method: 'get',
    params: query
  })
}

// 查询整体流水列表
export function allRecharge(query) {
  return request({
    url: '/mahjong/record/AllRecharge',
    method: 'get',
    params: query
  })
}

export function getInitTableReat() {
  return request({
    url: '/mahjong/myshops/openTableRate',
    method: 'get'
  })
}
export function selectItIntegralInfo() {
  return request({
    url: '/mahjong/members/memberIntegral',
    method: 'get'
  })
}
// 查询整体流水列表
export function listRecord(query) {
  return request({
    url: '/mahjong/record/list',
    method: 'get',
    params: query
  })
}

// 查询整体流水详细
export function getRecord(id) {
  return request({
    url: '/mahjong/record/' + id,
    method: 'get'
  })
}

// 新增整体流水
export function addRecord(data) {
  return request({
    url: '/mahjong/record',
    method: 'post',
    data: data
  })
}

// 修改整体流水
export function updateRecord(data) {
  return request({
    url: '/mahjong/record',
    method: 'put',
    data: data
  })
}

// 删除整体流水
export function delRecord(id) {
  return request({
    url: '/mahjong/record/' + id,
    method: 'delete'
  })
}

// 导出整体流水
export function exportRecord(query) {
  return request({
    url: '/mahjong/record/export',
    method: 'get',
    params: query
  })
}



// 导出整体流水
export function removeMoney(query) {
  return request({
    url: '/mahjong/moneying/'+query,
    method: 'delete',
    params: query
  })
}


// 导出整体流水
export function coverDesk(query) {
  return request({
    url: '/mahjong/costs/coverDesk/'+query,
    method: 'get',
    params: query
  })
}


// 导出整体流水
export function saveOrUpdateRoom(data) {
  return request({
    url: '/mahjong/record/saveOrUpdateRoom',
    method: 'post',
    data: data
  })
}

